# Template file for 'ucx'
pkgname=ucx
version=1.17.0
revision=1
build_style=gnu-configure
hostmakedepends="git automake autoconf libtool pkgconf"
makedepends="rdma-core-devel libnuma-devel fuse3-devel libgomp-devel"
depends="numactl rdma-core"
short_desc="Unified Communication X"
maintainer="MarcoAPC <marcoaureliopc@gmail.com>"
license="BSD-3-Clause"
homepage="http://www.openucx.org"
distfiles="https://github.com/openucx/ucx/archive/refs/tags/v${version}.tar.gz"
checksum=36db6b00b0939d746e86f9e0d32dc445faaa109e46dc643fb5ad779492abfaef

pre_configure() {
	./autogen.sh
	./contrib/configure-release --prefix=/usr CFLAGS="-Wno-address-of-packed-member -O2"
}

post_install() {
	vlicense LICENSE
}

ucx-devel_package() {
	short_desc+=" - development files"
	depends="${sourcepkg}>=${version}_${revision}"
	pkg_install() {
		vmove usr/include
		vmove usr/share/ucx/examples
		vmove usr/lib/cmake
		vmove "usr/lib/*.a"
		vmove "usr/lib/*.so"
		vmove "usr/lib/ucx/*.a"
		vmove "usr/lib/ucx/*.so"
		vmove usr/lib/pkgconfig
	}
}
